<script setup lang="ts">
import { useMemberStore } from '@/stores'
import { request } from '@/utils/http'
const memberStore = useMemberStore()

const requestData = async () => {
  const res = await request<string[]>({
    method: 'GET',
    url: '/member/profile',
  })
  console.log(res)
}
</script>

<template>
  <view class="my">
    <view>会员信息：{{ memberStore.profile }}</view>
    <button size="mini" plain type="primary">保存用户信息</button>
    <navigator url="/pages/login/login" open-type="navigate" hover-class="navigator-hover">
      登录页面
    </navigator>
    <button @tap="memberStore.clearProfile()" size="mini" plain type="warn">清理用户信息</button>
    <button @tap="requestData()" size="mini" plain type="warn">测试一个请求</button>
  </view>
</template>

<style lang="scss"></style>
